package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_repo_daily")
public class FRepoDaily {
    @Id
    private Long tid;

    /**
     * TS代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * 期限品种
     */
    @Column(name = "repo_maturity")
    private String repoMaturity;

    /**
     * 前收盘(%)
     */
    @Column(name = "pre_close")
    private Float preClose;

    /**
     * 开盘价(%)
     */
    private Float open;

    /**
     * 最高价(%)
     */
    private Float high;

    /**
     * 最低价(%)
     */
    private Float low;

    /**
     * 收盘价(%)
     */
    private Float close;

    /**
     * 加权价(%)
     */
    private Float weight;

    /**
     * 加权价(利率债)(%)
     */
    @Column(name = "weight_r")
    private Float weightR;

    /**
     * 成交金额(万元)
     */
    private Float amount;

    /**
     * 成交笔数(笔)
     */
    private Integer num;

    public FRepoDaily(Long tid, String tsCode, String tradeDate, String repoMaturity, Float preClose, Float open, Float high, Float low, Float close, Float weight, Float weightR, Float amount, Integer num) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.tradeDate = tradeDate;
        this.repoMaturity = repoMaturity;
        this.preClose = preClose;
        this.open = open;
        this.high = high;
        this.low = low;
        this.close = close;
        this.weight = weight;
        this.weightR = weightR;
        this.amount = amount;
        this.num = num;
    }

    public FRepoDaily() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取TS代码
     *
     * @return ts_code - TS代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS代码
     *
     * @param tsCode TS代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取期限品种
     *
     * @return repo_maturity - 期限品种
     */
    public String getRepoMaturity() {
        return repoMaturity;
    }

    /**
     * 设置期限品种
     *
     * @param repoMaturity 期限品种
     */
    public void setRepoMaturity(String repoMaturity) {
        this.repoMaturity = repoMaturity;
    }

    /**
     * 获取前收盘(%)
     *
     * @return pre_close - 前收盘(%)
     */
    public Float getPreClose() {
        return preClose;
    }

    /**
     * 设置前收盘(%)
     *
     * @param preClose 前收盘(%)
     */
    public void setPreClose(Float preClose) {
        this.preClose = preClose;
    }

    /**
     * 获取开盘价(%)
     *
     * @return open - 开盘价(%)
     */
    public Float getOpen() {
        return open;
    }

    /**
     * 设置开盘价(%)
     *
     * @param open 开盘价(%)
     */
    public void setOpen(Float open) {
        this.open = open;
    }

    /**
     * 获取最高价(%)
     *
     * @return high - 最高价(%)
     */
    public Float getHigh() {
        return high;
    }

    /**
     * 设置最高价(%)
     *
     * @param high 最高价(%)
     */
    public void setHigh(Float high) {
        this.high = high;
    }

    /**
     * 获取最低价(%)
     *
     * @return low - 最低价(%)
     */
    public Float getLow() {
        return low;
    }

    /**
     * 设置最低价(%)
     *
     * @param low 最低价(%)
     */
    public void setLow(Float low) {
        this.low = low;
    }

    /**
     * 获取收盘价(%)
     *
     * @return close - 收盘价(%)
     */
    public Float getClose() {
        return close;
    }

    /**
     * 设置收盘价(%)
     *
     * @param close 收盘价(%)
     */
    public void setClose(Float close) {
        this.close = close;
    }

    /**
     * 获取加权价(%)
     *
     * @return weight - 加权价(%)
     */
    public Float getWeight() {
        return weight;
    }

    /**
     * 设置加权价(%)
     *
     * @param weight 加权价(%)
     */
    public void setWeight(Float weight) {
        this.weight = weight;
    }

    /**
     * 获取加权价(利率债)(%)
     *
     * @return weight_r - 加权价(利率债)(%)
     */
    public Float getWeightR() {
        return weightR;
    }

    /**
     * 设置加权价(利率债)(%)
     *
     * @param weightR 加权价(利率债)(%)
     */
    public void setWeightR(Float weightR) {
        this.weightR = weightR;
    }

    /**
     * 获取成交金额(万元)
     *
     * @return amount - 成交金额(万元)
     */
    public Float getAmount() {
        return amount;
    }

    /**
     * 设置成交金额(万元)
     *
     * @param amount 成交金额(万元)
     */
    public void setAmount(Float amount) {
        this.amount = amount;
    }

    /**
     * 获取成交笔数(笔)
     *
     * @return num - 成交笔数(笔)
     */
    public Integer getNum() {
        return num;
    }

    /**
     * 设置成交笔数(笔)
     *
     * @param num 成交笔数(笔)
     */
    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", repoMaturity=").append(repoMaturity);
        sb.append(", preClose=").append(preClose);
        sb.append(", open=").append(open);
        sb.append(", high=").append(high);
        sb.append(", low=").append(low);
        sb.append(", close=").append(close);
        sb.append(", weight=").append(weight);
        sb.append(", weightR=").append(weightR);
        sb.append(", amount=").append(amount);
        sb.append(", num=").append(num);
        sb.append("]");
        return sb.toString();
    }
}